import {config} from "../config/config";

/**
 * @author LuciferYe
 * @date 2020-12-06 20:41
 */
class Http {
    static async request({url, data, method = 'GET'}) {
        const res = await wx.p.request({
            url: `${config.apiBaseUrl}${url}`,
            data,
            method,
            header:{
                appkey: config.appkey
            }
        })
        return res.data;
    }
}

export {
    Http
}
